<script setup>
  import { ref } from 'vue'
  import test from './components/ref的使用.vue'
  const sonRef = ref(null)
  const getSon = ()=>{
    sonRef.value.getMsg()
  }
</script>
<template>
<div>
  <test ref="sonRef"></test>
  <button @click="getSon">点我 调用子组件方法</button>
</div>
</template>
<style scoped>
</style>